<style>
 /*验证：提示信息样式 begin*/
 .am-alert-danger {
    background-color: transparent;
    border-color: transparent;
    color: red;
  }
  .am-alert {
    margin-bottom: 1em;
    padding: .625em;
    background: transparent;
    border: none;
    border-radius: 0;
  }
  .red_border{
      border: solid 1px red;
  }
  .green_border{
      border: solid 1px #5EB85E;
  }
  /*验证：提示信息样式 end*/
  /*附件上传*/
  .am-progress-xs {
    height: .2rem;
  }
  .am-progress {
    margin-bottom: 0;
  }
    .enabled{
        color: red;
    }
</style>
<input type="hidden" id="communicationId" name="communicationId" value="${communicationFee.id!''}"/>
<input type="hidden" id="businessId" name="businessId" value="${businessId!''}"/>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">业务授权属性</div>
    <div class="am-u-sm-8 am-u-md-8 switch-button">
        <input type="hidden" id="localized" name="localized" value="${communicationFee.localized!0}"/>
        <input id="_localized" type="checkbox" data-size='xs'
               data-am-switch data-off-text="统一授权" data-on-text="属地化授权" value="${communicationFee.localized!0}"  <%if(communicationFee.localized!0 == 1){%> checked <%}%> />
    </div>
    <div class="am-u-sm-2 am-u-md-5 input-msg"></div>
</div>

<!--<div class="am-g am-form-group am-margin-top" id="localizedCities">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>属地化
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input type="hidden" value="" id="city_ids" name="city_ids"/>
        <select onchange="getCityVal()"
                multiple data-am-selected="{btnWidth:'100%',maxHeight:300,maxWidth:200,searchBox: 1,placeholder:'请选择属地化地市'}" id="city_select" name="city_select">

            <option value="-1">全选</option>
            <%for(city in cities!){%>
                <option value="${city.id}" <%for(config in localizedConfig!){if(city.id==config.localized_city_id){%>selected<%}}%>
                >${city.DisplayName}</option>
            <%}%>
        </select>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>-->


<div class="am-g am-form-group am-margin-top" id="localizedCities">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>属地化
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input type="checkbox" id="all" value="">全选/全不选
        <ul id="list">
            <%for(city in cities!){%>
            <li style="float: left;margin-right: 20px;list-style-type: none;"><label><input type="checkbox" name="city_ids" value="${city.id}"
                <%for(config in localizedConfig!){if(city.id==config.localized_city_id){%>checked<%}}%>
                >${city.DisplayName}</label></li>
            <%}%>
        </ul>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>





<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>业务大类
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input type="hidden" value="" id="tariff_class_ids" name="tariff_class_ids"/>
        <select  data-validation-message="请选择业务大类"  required onchange="getTariffClassVal()"
                 multiple data-am-selected="{btnWidth:'100%',maxHeight:300,maxWidth:200,searchBox: 1}" id="tariff_class_select" name="tariff_class_select">
            <%for(tariffClassRelation in tariffClassRelationList){%>
            <%if(tariffClassRelation.enabled!"" == 1){%>
                <option value="${tariffClassRelation.tariff_class_id}" selected>${tariffClassRelation.name}</option>
            <%}%>
            <%if(tariffClassRelation.enabled!"" == 0){%>
                <option  style="color: red" value="${tariffClassRelation.tariff_class_id}" selected >
                    (已禁用)&nbsp;&nbsp;${tariffClassRelation.name}
                </option>
            <%}%>
            <%}%>
            <%for(tariffClass in tariffClassList){%>
                <%if(tariffClass.enabled!"" == 1){%>
                    <option  value="${tariffClass.id}" >${tariffClass.name}</option>
                <%}%>
                <%if(tariffClass.enabled!"" == 0){%>
                    <option  style="color: red"  value="${tariffClass.id}">
                        (已禁用)&nbsp;&nbsp;${tariffClass.name}
                    </option>
                <%}%>
            <%}%>
        </select>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>


<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>业务类型
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <select id="comm_type" name="comm_type">
            <option value="0"<%if(communicationFee.type!"" == 0){%>selected<%}%>>主资费</option>
            <option value="1" <%if(communicationFee.type!"" == 1){%>selected<%}%>>附加资费</option>
            <option value="2" <%if(communicationFee.type!"" == 2){%>selected<%}%>>营销活动</option>
            <option value="3" <%if(communicationFee.type!"" == 3){%>selected<%}%>>营销活动（短信）</option>
        </select>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>


<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>业务名称
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input data-validation-message="输入业务名称,2-24个字符" type="text"  name="name" id="name" minlength="2" maxlength="24" placeholder="输入业务名称" required value="${communicationFee.name!''}"/>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>业务/短信代码
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input data-validation-message="输入业务/短信代码,2-30个字符" type="text"  name="code" id="code" minlength="2" maxlength="30" placeholder="输入业务/短信代码" required value="${communicationFee.code!''}"/>

    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg" ></div>
</div>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        资费详情
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <textarea data-validation-message="输入资费详情" class="" rows="5" name="description" id="description"  minlength="0" maxlength="1024" placeholder="输入资费详情">${communicationFee.description!''}</textarea>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg" ></div>
</div>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>业务详情
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <div class="am-g am-form-group">
            <div class="am-u-sm-12 am-u-md-12">
                <script id="detail" name="detail" 5511type="text/plain" style="height:20rem;">
                    ${communicationFee.detail!''}
                </script>

            </div>
        </div>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg">
        <div id="alert_detail_msg" class="am-alert am-alert-danger" style="">请输入业务详情</div>
    </div>
</div>



<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-2 am-u-md-2 am-text-right">
        <span style="color: red;">*</span>开始时间
    </div>
    <div class="am-u-sm-8 am-u-md-8">
        <input type="text" id="start_time" name="start_time" data-validation-message="开始时间不能为空或晚于结束时间"  class="am-form-field" placeholder="开始时间" data-am-datepicker readonly required value="${communicationFee.start_date!, dateFormat="yyyy-MM-dd"}"/>
    </div>
    <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>



<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-2 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>结束时间
  </div>
  <div class="am-u-sm-8 am-u-md-8">
      <input type="text" id="end_time" name="end_time"data-validation-message="结束时间不能为空或早于开始时间"
             class="am-form-field" placeholder="结束时间"
             data-am-datepicker readonly required value="${communicationFee.end_date!, dateFormat="yyyy-MM-dd"}"/>
  </div>
  <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>




<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-2 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>排序字段
  </div>
  <div class="am-u-sm-8 am-u-md-8">
    <input data-validation-message="输入排序字段,只能是整数" type="text"  name="sort" id="sort" minlength="1"
           maxlength="10" placeholder="输入排序字段" required value="${communicationFee.sort!''}"  pattern="^[0-9]*$"/>
  </div>
  <div class="am-u-sm-2 am-u-md-2 input-msg" id="urlErrMsg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-2 am-u-md-2 am-text-right">是否活动业务</div>
  <div class="am-u-sm-8 am-u-md-8 switch-button">
    <input id="isActivity" name="is_activity" type="checkbox" data-size='xs'
      data-am-switch data-off-text="否" data-on-text="是" value="${communicationFee.is_activity!0}" <%if(communicationFee.is_activity! == 1){%> checked <%}%> />
  </div>
  <div class="am-u-sm-2 am-u-md-5 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-2 am-u-md-2 am-text-right">
    活动名称
  </div>
  <div class="am-u-sm-8 am-u-md-8">
    <input data-validation-message="输入活动名称，不能超过3个字" type="text"  name="activity_name" id="activityName" maxlength="3" placeholder="请输入活动名称，不能超过3个字" value="${communicationFee.activity_name!''}" <%if(communicationFee.is_activity! != 1){%> readonly <%}%>  />
  </div>
  <div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>


